<template>
  <div class="wrapper">
    <div class="header">
      <div class="header__bgcolor" />
      <div class="header__changeicon iconfont">&#xe6bf;</div>
      <div class="usermessage">
        <img src="./imgs/avatar.jpg" alt="" class="usermessage__icon" />
        <div class="usermessage__name">
          <div class="name__text">
            热心市民李先生
            <div class="name__star">
              <img src="./imgs/star.png" alt="" class="name__star__icon" />16
            </div>
          </div>
        </div>
        <div class="usermessage__id">ID: 1069643013</div>
        <div class="discounts">
          <div class="discounts__item">
            <div class="discounts__item__title">红包</div>
            <div class="discounts__item__text">218</div>
          </div>
          <div class="discounts__item">
            <div class="discounts__item__title">优惠劵</div>
            <div class="discounts__item__text">12张</div>
          </div>
          <div class="discounts__item">
            <div class="discounts__item__title">鲜豆</div>
            <div class="discounts__item__text">88</div>
          </div>
          <div class="discounts__item">
            <div class="discounts__item__title">白条</div>
            <div class="discounts__item__text">1000</div>
          </div>
        </div>
      </div>
    </div>
    <div class="content">
      <div class="content__item">
        <img
          src="./imgs/money.png"
          class="content__item__img moneyimg"
          alt=""
        />
        <div class="content__item__text">我的钱包</div>
        <div class="content__item__icon iconfont">&#xe6aa;</div>
      </div>
      <router-link to="/myAddress">
        <div class="content__item">
          <img
            src="./imgs/address.png"
            class="content__item__img addressimg"
            alt=""
          />
          <div class="content__item__text">我的地址</div>
          <div class="content__item__icon iconfont">&#xe6aa;</div>
        </div>
      </router-link>
      <div class="content__item">
        <img src="./imgs/help.png" class="content__item__img helpimg" alt="" />
        <div class="content__item__text">客服与帮助</div>
        <div class="content__item__icon iconfont">&#xe6aa;</div>
      </div>
    </div>
  </div>
  <Docker :num="3" />
</template>

<script>
import Docker from "../../components/docker/Docker.vue";
export default {
  name: "userPage",
  components: { Docker },
};
</script>

<style lang="scss" scoped>
@import "../../style/viriables.scss";
.wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  overflow-y: scroll;
}
.header {
  position: relative;
  width: 100%;
  height: 3.1rem;
  overflow: hidden;
  &__bgcolor {
    position: absolute;
    height: 4.6rem;
    width: 160%;
    background-image: linear-gradient(239deg, #3a6ff3 0%, #50c7fb 100%);
    border-radius: 50%;
    transform: translate(-19%, -50%);
  }
  &__changeicon {
    position: absolute;
    top: 0.4rem;
    right: 0.21rem;
    font-size: 0.2rem;
    color: $color-fff;
  }
  .usermessage {
    position: absolute;
    top: 0.91rem;
    width: 3.39rem;
    height: 2.03rem;
    background-color: $color-fff;
    margin: 0 0.18rem;
    border-radius: 0.08rem;
    box-shadow: 0 0.08rem 0.16rem 0 rgba(0, 0, 0, 0.08);
    &__icon {
      position: absolute;
      left: 1.23rem;
      top: -0.47rem;
      width: 0.94rem;
      height: 0.94rem;
      border-radius: 50%;
    }
    &__name {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      margin-top: 0.59rem;
      text-align: center;
      font-size: 0.24rem;
      line-height: 0.36rem;
      .name__text {
        position: relative;
        .name__star {
          position: absolute;
          right: -0.74rem;
          top: 0.03rem;
          display: inline-block;
          width: 0.7rem;
          height: 0.3rem;
          border-radius: 1.4rem;
          line-height: 0.3rem;
          background-image: linear-gradient(180deg, #bee700 0%, #8aca00 100%);
          font-size: 0.2rem;
          color: $color-fff;
          padding-right: 0.08rem;
          vertical-align: middle;
          transform: scale(0.5);
          &__icon {
            display: inline-block;
            background: rgba(0, 0, 0, 0.2);
            width: 0.24rem;
            height: 0.24rem;
            vertical-align: top;
            border-radius: 0.12rem;
            transform: translateY(0.04rem);
            margin-right: 0.12rem;
          }
        }
      }
    }
    &__id {
      margin-top: 0.02rem;
      text-align: center;
      color: #c1c0c9;
      font-style: 0.14rem;
      line-height: 0.17rem;
    }
  }
  .discounts {
    display: flex;
    margin-top: 0.12rem;
    border-top: solid $content-bgColor 0.01rem;
    &__item {
      flex: 1;
      text-align: center;
      &__title {
        margin-top: 0.12rem;
        font-size: 0.12rem;
        color: #c1c0c9;
        line-height: 0.17rem;
      }
      &__text {
        margin-top: 0.03rem;
        color: #262628;
        font-size: 0.2rem;
        line-height: 0.28rem;
      }
    }
  }
}
.content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 0.18rem;
  padding: 0.16rem;
  box-shadow: 0 0.08rem 0.16rem 0 rgba(0, 0, 0, 0.08);
  border-radius: 0.08rem;
  height: 1.46rem;
  box-sizing: border-box;
  a {
    text-decoration: none;
  }
  &__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    &__img {
      padding: 0.04rem;
      width: 0.14rem;
      height: 0.14rem;
      border-radius: 0.08rem;
    }
    &__text {
      flex: 1;
      color: #262626;
      font-size: 0.14rem;
      margin-left: 0.12rem;
    }
    &__icon {
      font-size: 0.12rem;
      color: #c2c4ca;
    }
  }
  .moneyimg {
    background-color: #ed4a47;
  }
  .addressimg {
    background-color: #32c5ff;
  }
  .helpimg {
    background-color: #9013fe;
  }
}
</style>